Object-oriented programming (OOP) is a type of programming that supports object technologies. OOP is an evolutionary form of modular programming with more formal rules that allow pieces of software to be reused and interchanged between programs. Major concepts of OOP include encapsulation, inheritance and polymorphism.
Encapsulation is the creation of self-sufficient modules that contain the data and the processing, including the data structures and functions that manipulate that data. These user-defined, or abstract, data types are called “classes.” One instance of a class is called an “object.” For example, in a payroll system, a class could be defined as Manager, and Pat and Jan, the actual objects, are instances of that class.
Classes are typically created in hierarchies, and inheritance allows the knowledge in one class to be passed down the hierarchy. This means less programming is required when adding functions to complex systems. If a step is added at the bottom of a hierarchy, then only the processing and data associated with that unique step needs to be added. Everything else about that step is inherited.
Object-oriented programming allows procedures about objects to be created whose exact type is not known until runtime. For example, a screen cursor may change its shape from an arrow to a line depending on the program mode. The routine to move the cursor on screen in response to mouse movement would be written for “cursor,” and polymorphism allows that cursor to be whatever shape is required at runtime. Polymorphism also allows a new shape to be easily integrated into the program.
An OOP design pattern, or more simply an OOP pattern or a pattern, is a common solution to a common problem within a given context. Patterns in the context of software development are used extensively to solve small and large problems in the design, modeling, implementation, deployment, and maintenance of software systems. The application of a pattern to or within a software system results in the system being structured and behaving in certain ways dictated by or consistent with the pattern. As such, a pattern can be considered as defining a set of constraints on the objects that make up the pattern.
The application of a pattern generally occurs by acting upon OOP objects through one or more explicit or implicit models that describe the objects and allow their manipulation. Patterns can be created in a variety of different OOP languages, such as Java, C++, and other OOP languages. Certain patterns and classes of patterns are recognized across the software industry, and may have implementations provided by software development tools.
Patterns can be created in the Java programming language, for example, using a software development tool. There are two different representations of patterns in software code written in the Java programming language in particular. The first representation is the definition of the pattern itself, as provided by the software development tool. The second representation is the definition of a pattern as applied to existing software code, or identified within existing software code that conforms to the definition of the pattern. This representation of a pattern is an instance or application of the definition of a pattern provided by the software development tool.
An important feature of such software development tools is to allow the creation of new patterns by the end users of the tools. These new patterns may be developed to enforce programming paradigms, standards, or conventions within an organization, as well as to provide general accelerators for the development of applications. For instance, one aspect of the creation of patterns that is desirable is the ability to distribute the patterns across an organization, as well as publicly, and to support and maintain the patterns and the software systems to which the patterns have been implied.
However, the creation and development of patterns can be tedious. Existing software development tools generally only allow the creation of patterns from scratch. As such, developers have to painstakingly define new patterns from their foundations upwards, or copy existing patterns and modify them to result in new or desired functionality. Either way, pattern development is less than optimal, resulting in developers potentially taking less advantage of patterns than they should.
For these and other reasons, there is a need for the present invention.